* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 10px;
    font-family: 'FangSong', sans-serif;
    color: #fff;
    /* 027 厦门的微笑 */
    background-image: radial-gradient(circle 248px at center, #16d9e3 0%, #30c7ec 47%, #46aef7 100%);
}

.container {
    padding: 20px;
    width: 350px;
    max-width: 100%;
    background-color: rgba(0, 0, 0, .5);
    box-shadow: 0 2px 10px rgba(255, 255, 255, .8);
}

/* 随机密码生成器 */
h2 {
    margin: 10px 0 20px;
    text-align: center;
}

/* 密码显示框 */
.result-container {
    display: flex;
    /* 默认排序,可省略 */
    /* justify-content: flex-start; */
    align-items: center;
    position: relative;
    padding: 10px;
    width: 100%;
    height: 50px;

    font-size: 18px;
    letter-spacing: 1px;
    background-color: rgba(0, 0, 0, .5);
}

/* 显示框(选择器避免使用id,权重太高) */
.result-container span {
    /* 允许Y轴溢出内容滚动 */
    overflow-y: scroll;
    height: 100%;
    /* 最大宽度需要留出 40px的按钮位置 */
    max-width: calc(100%-40px);
    /* 允许长单词或地址 换行 */
    word-wrap: break-word;
}

/* 滚动条(伪元素)样式 */
.result-container span::-webkit-scrollbar {
    width: 1rem;
}

/* 复制密码按钮 */
.result-container .btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    font-size: 20px;
}

/* 按钮通用样式 */
.btn {
    padding: 8px 12px;
    font-size: 16px;
    color: #fff;
    background-color: #30c7ec;
    border: 0;
    cursor: pointer;
}

/* 大按钮-生成随机密码 */
.btn-large {
    display: block;
    width: 100%;
}

/* 设置区 */
.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}